function [mu_T,L_T] = sample_time_hyperparams(T)
[D,K] = size(T);

beta0 = 1;
rh0 = zeros(D,1);
W0 = eye(D);
nu0 = D;

mu0_ = (T(:,1)+beta0*rh0)/(beta0+1);
beta0_ = beta0 + 1;
nu0_ = nu0 + K;

Td = T(:,2:K) - T(:,1:K-1);
W0_ = inv(inv(W0) + Td*Td' + ...
            (beta0/(beta0+1))*((T(:,1)-rh0))*(T(:,1)-rh0)');

L_T = wishrnd((W0_+W0_')*0.5, nu0_);
mu_T = mu0_ + chol(inv(beta0_*L_T))'*randn(D,1);
        